<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt"  prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>后台管理系统</title>
<meta name="author" content="DeathGhost" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<![endif]-->

</head>
<body>
<!--header-->

<header>
 <h1><img src="images/admin_logo.png"/></h1>
 <ul class="rt_nav">
  <li><a href="#" target="_blank" class="website_icon">站点首页（放全端首页）</a></li>
  <li><a href="#" class="admin_icon">DeathGhost</a></li>
  <li><a href="#" class="set_icon">账号设置</a></li>
  <li><a href="../den" class="quit_icon">安全退出</a></li>
 </ul>
</header>
<aside class="lt_aside_nav content mCustomScrollbar">
 <h2><a href="index.jsp">起始页</a></h2>
 <ul>
  <li>
   <dl>
    <dt>常用布局示例</dt>
    <dd><a href="../loginpage" class="active">商品列表示例</a></dd>
    <dd><a href="product_detail.jsp">商品详情示例</a></dd>
    <dd><a href="zengjia.jsp">商品增加示例</a></dd>
    <dd><a href="../getpage">商品回收站示例</a></dd>
   </dl>
  </li>
  <li>
   <dl>
    <dt>订单信息</dt>
    <dd><a href="../all">订单列表示例</a></dd>
    <dd><a href="#">订单详情示例</a></dd>
   </dl>
  </li>
  <li>
    <dl>
    <dt>会员管理</dt>
    <dd><a href="../page">会员列表示例</a></dd>
    <dd><a href="user_detail.jsp">添加会员（详情）示例</a></dd>
   </dl>
  </li>
  <li>
   <dl>
    <dt>配送与支付设置</dt>
    <dd><a href="express_list.jsp">配送方式</a></dd>
    <dd><a href="pay_list.jsp">支付方式</a></dd>
   </dl>
  </li>
  <li>
   <p class="btm_infor">熊 版权所有</p>
  </li>
 </ul>
</aside>
<section class="rt_wrap content mCustomScrollbar">
 <div class="rt_content">
      <div class="page_title">
       <h2 class="fl">订单列表示例</h2>
      </div>
      <section class="mtb">
      
       <input type="text" class="textbox textbox_225" placeholder="输入订单编号或收件人姓名/电话..."/>
       <input type="button" value="查询" class="group_btn"/>
      </section>
      <table class="table">
       <tr>
        <th>订单编号</th>
        <th>收件人</th>
        <th>联系电话</th>
        <th>收件人地址</th>
        <th>订单金额</th>
        <th>订单状态</th>
        <th>配送方式</th>
        <th>操作</th>
       </tr>
       <c:forEach items="${list}" var="us" varStatus="use">
       <tr>
        <td>${us.orderId }</td>
        <td>${us.orderName }</td>
        <td>${us.orderPhone }</td>
        <td>${us.orderAddrss }</td>
        <td>${us.orderMoney }</td>
        <td class="center">${us.orderType }</td>
        <td class="center">${us.orderPeisong }</td>
        <td class="center">
         <a href="../getsee?id=${us.id }" title="查看订单" class="link_icon" target="_blank">&#118;</a>
         <a  href="javascript:del(${us.id})" title="删除" class="link_icon" id="del">&#100;</a>
        </td>
       </tr>
       </c:forEach>
      </table>
      <aside class="paging">
       <a>总页数${index}/${total}</a>
       <a href="/jieyes2/all?index=1">首页</a>
       <a href="/jieyes2/all?index=${index-1 }">上一页</a>
       <a href="/jieyes2/all?index=${index+1 }">下一页</a>
       <a href="/jieyes2/all?index=${total}">尾页</a>
      </aside>
 </div>
</section>
</body>
<script src="js/jquery.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
<script>
function del(id) {
		var is = confirm("是否要删除吗?");
		if (is) {
			$.post("../updSerlvet", "id=" + id, function(data) {
				if (data != 0) {
					alert("删除成功");
					location.href="../all";
				} else {
					alert("请联系熊大");
						location.href="../all";
				}
			});
		}
	}


	(function($){
		$(window).load(function(){
			
			$("a[rel='load-content']").click(function(e){
				e.preventDefault();
				var url=$(this).attr("href");
				$.get(url,function(data){
					$(".content .mCSB_container").append(data); //load new content inside .mCSB_container
					//scroll-to appended content 
					$(".content").mCustomScrollbar("scrollTo","h2:last");
				});
			});
			
			$(".content").delegate("a[href='top']","click",function(e){
				e.preventDefault();
				$(".content").mCustomScrollbar("scrollTo",$(this).attr("href"));
			});
			
		});
		//删除
	$(".del").click(function() {
		if (confirm("确认删除")) {
			var s = $(this).parent().parent().children().get(0).textContent;
			$.post("drop", "id=" + s, function(i) {
				if (i > 0) {
					alert("删除成功");
				} else {
					alert("删除失败");
				}
				location.href = "page";
			});
		}
	});
		
	})(jQuery);
</script>
</html>

